using UnityEngine;
using System.Collections;

public class PlayerDecisionTime : MonoBehaviour {

	GameObject playerTimeRemainingObject;
	string playerTimeRemainingText;
	Component playerTimeRemaining;
	DecisionTimer timerScript;
	
	
	void Awake()
	{
		playerTimeRemainingObject = GameObject.Find("TimerHUD");
		playerTimeRemaining = playerTimeRemainingObject.guiText;
		timerScript = GetComponent<DecisionTimer>();
	}
	
	// Use this for initialization
	void Start () {
		playerTimeRemainingText = "Time Remaining: " + timerScript.getTimeRemaining();
		playerTimeRemaining.guiText.text = playerTimeRemainingText;
	}
	
	// Update is called once per frame
	void Update () {
		playerTimeRemainingText = "Time Remaining: " + (int) timerScript.getTimeRemaining();
		playerTimeRemaining.guiText.text = playerTimeRemainingText;
	}
	
	
}
